package cn.sumpu.app.guoguojie.domain;

import java.io.Serializable;
import java.util.Date;
import cn.sumpu.app.guoguojie.constant.Expression;
import cn.sumpu.app.guoguojie.util.Common;

public class Doing implements Serializable {
	private static final long serialVersionUID = 163804985818396999L;
	private Integer id;
	private String identifier;
	private String member;
	private String memberName;
	private String memberAvatar;
	private String content;
	private Boolean isForward;
	private Integer viewAmount;
	private Integer replyAmount;
	private String pictureUrl;
	private String pictureThumbnail;
	private String imageServer;
	private String postIp;
	private Date gmtCreated;
	private Date gmtModified;
	private String family;
	private String familyName;
	private String familyAvatar;
	
	private Integer forwards;
	private String rootId;
	private String toId;
	private String toMember;
	private String type;
//	当前微博的类型
	private String baseType;
	
	private Doing rootDoing;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getIdentifier() {
		return identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	public String getMember() {
		return member;
	}

	public void setMember(String member) {
		this.member = member;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Boolean getIsForward() {
		return isForward;
	}

	public void setIsForward(Boolean isForward) {
		this.isForward = isForward;
	}

	public Integer getViewAmount() {
		return viewAmount;
	}

	public void setViewAmount(Integer viewAmount) {
		this.viewAmount = viewAmount;
	}

	public Integer getReplyAmount() {
		return replyAmount;
	}

	public void setReplyAmount(Integer replyAmount) {
		this.replyAmount = replyAmount;
	}

	public String getPictureUrl() {
		return pictureUrl;
	}

	public void setPictureUrl(String pictureUrl) {
		this.pictureUrl = pictureUrl;
	}

	public String getPostIp() {
		return postIp;
	}

	public void setPostIp(String postIp) {
		this.postIp = postIp;
	}

	public Date getGmtCreated() {
		return gmtCreated;
	}

	public void setGmtCreated(Date gmtCreated) {
		this.gmtCreated = gmtCreated;
	}

	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	
	
	
	public String getFamily() {
		return family;
	}

	public void setFamily(String family) {
		this.family = family;
	}
	
	

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}
	

	public String getMemberAvatar() {
		return memberAvatar;
	}

	public void setMemberAvatar(String memberAvatar) {
		this.memberAvatar = memberAvatar;
	}

	public String getLastDate(){
		return Common.getDate(this.getGmtCreated());
	}
	
	public String getShowContent(){
		String showContent = this.content;
		if(showContent==null){
			return "";
		}else if(showContent.length()>30){
			showContent = showContent.substring(0, 30)+"......";
		}
		return showContent;
	}
	
	public String getReplaceContent(){
		return Expression.replaceAll(content);
	}

	public String getPictureThumbnail() {
		return pictureThumbnail;
	}

	public void setPictureThumbnail(String pictureThumbnail) {
		this.pictureThumbnail = pictureThumbnail;
	}

	public String getImageServer() {
		return imageServer;
	}

	public void setImageServer(String imageServer) {
		this.imageServer = imageServer;
	}
	public String getFormatDate(){
		return Common.getDate(gmtModified);
	}

	public Integer getForwards() {
		return forwards;
	}

	public void setForwards(Integer forwards) {
		this.forwards = forwards;
	}

	public String getRootId() {
		return rootId;
	}

	public void setRootId(String rootId) {
		this.rootId = rootId;
	}

	public String getToId() {
		return toId;
	}

	public void setToId(String toId) {
		this.toId = toId;
	}

	public String getToMember() {
		return toMember;
	}

	public void setToMember(String toMember) {
		this.toMember = toMember;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getFamilyName() {
		return familyName;
	}

	public void setFamilyName(String familyName) {
		this.familyName = familyName;
	}

	public String getFamilyAvatar() {
		return familyAvatar;
	}

	public void setFamilyAvatar(String familyAvatar) {
		this.familyAvatar = familyAvatar;
	}

	public Doing getRootDoing() {
		return rootDoing;
	}

	public void setRootDoing(Doing rootDoing) {
		this.rootDoing = rootDoing;
	}

	public String getBaseType() {
		return baseType;
	}

	public void setBaseType(String baseType) {
		this.baseType = baseType;
	}
	
	
	
}
